feat: implement X OAuth 2.0 PKCE backend and env var support#60
Open
shaal wants to merge 1 commit intoviperrcrypto:mainfrom
Open
feat: implement X OAuth 2.0 PKCE backend and env var support#60shaal wants to merge 1 commit intoviperrcrypto:mainfrom
shaal wants to merge 1 commit intoviperrcrypto:mainfrom
Conversation
- Add complete OAuth 2.0 PKCE flow: authorize, callback, status, disconnect, and bookmark fetch endpoints - Support X_OAUTH_CLIENT_ID and X_OAUTH_CLIENT_SECRET env vars as fallback when credentials aren't stored in the database - Auto-refresh expired tokens using offline.access scope - Paginate through X API v2 bookmarks with media expansion - Document new env vars in .env.example Closes viperrcrypto#59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
X_OAUTH_CLIENT_ID,X_OAUTH_CLIENT_SECRET) as fallback for X OAuth credentials, consistent with howANTHROPIC_API_KEYworks.env.exampleNew API routes
/api/import/x-oauth/status/api/import/x-oauth/authorize/api/import/x-oauth/callback/api/import/x-oauth/disconnect/api/import/x-oauth/fetchNote
The X API v2
GET /2/users/:id/bookmarksendpoint requires a paid developer plan (Basic at $200/month). Free-tier accounts will see a credits error after connecting. This is an X platform limitation, not a Siftly bug — but it may be worth adding a note in the UI.Test plan
X_OAUTH_CLIENT_IDandX_OAUTH_CLIENT_SECRETin.env.local/importpage shows "Connect X Account" button (not "not configured" warning)/import?x_connected=trueconnected: truewith user infoCloses #59